#Copyright 2012 César Serrano López
#This program is free software: you can redistribute it and/or modify it 
#under the terms of the GNU General Public License as published by the 
#Free Software Foundation, either version 3 of the License, or (at your
#option) any later version.

#This program is distributed in the hope that it will be useful, but
#WITHOUT ANY WARRANTY; without even the implied warranty of 
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
#Public License for more details.
#You should have received a copy of the GNU General Public License along 
#with this program. If not, see <http://www.gnu.org/licenses/>
package Persona;
use strict;
use Moose;

    has 'dni',is=>'rw',isa=>'Str';
	has 'nombre',is=>'rw',isa=>'Str';
	has 'apellido',is=>'rw',isa=>'Str';
	has 'edad',is=>'rw',isa=>'Int';

#Método para ver o editar el nombre.

#metodo para ver o editar el dni.
sub Dni {
	
		my $self = shift;
		$self->{'dni'} = shift if(@_);
		return $self->{'dni'};
	}

sub Nombre {
	
       my $self = shift; 
       $self->{'nombre'} = shift if (@_);
       #Devolvemos el nombre
       return $self->{'nombre'}; 
	}
	
sub Apellido {
	
       my $self = shift; 
       $self->{'apellido'} = shift if (@_);
       return $self->{'apellido'}; 
	}	
#metodo para ver o editar la edad.
sub Edad {
	
		my $self = shift;
		$self->{'edad'} = shift if(@_);
		return $self->{'edad'};
	}
#Fin
1;
